#import "JourneyXenophileController.h"
        
#import "JourneyXenophileModel.h"
#import "JourneyXenophileCell.h"
#import "Masonry.h"

@interface JourneyXenophileController () <UITableViewDataSource, UITableViewDelegate>

@property (nonatomic, strong) UITableView *grinTableView;
@property (nonatomic, strong) NSMutableArray *resilientTransformCourageousArray;

@end

@implementation JourneyXenophileController

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    [self wonderReverieZenithConfiglayout];
	[self insectloadData];
}


- (UITableView *)figHandleTableView {
    if (!_grinTableView) {
        _grinTableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStylePlain];
        _grinTableView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight;
        _grinTableView.estimatedRowHeight = 0;
        _grinTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
        _grinTableView.contentInset = UIEdgeInsetsMake(16, 0, 16, 0);
        _grinTableView.delegate = self;
        _grinTableView.dataSource = self;
        _grinTableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
        _grinTableView.showsVerticalScrollIndicator = NO;
        _grinTableView.showsHorizontalScrollIndicator = NO;
        _grinTableView.backgroundColor = UIColor.clearColor;
    }
    return _grinTableView;
}

//: 初始化页面UI
- (void)wonderReverieZenithConfiglayout {

	[self.view addSubview:self.grinTableView];
	[self.grinTableView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.leading.trailing.equalTo(self.view);
		make.top.equalTo(self.view);
		make.bottom.equalTo(self.view.mas_safeAreaLayoutGuideBottom);
	}];
}


//: 获取数据模型
- (void)insectloadData {
	
}

//: 懒加载数据模型数组
- (NSMutableArray *)resilientTransformCourageousArray {
	if (!_resilientTransformCourageousArray) {
		_resilientTransformCourageousArray = [NSMutableArray array];
	}
	return _resilientTransformCourageousArray;
}

#pragma mark - UITableView DataSource 
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return self.resilientTransformCourageousArray.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    JourneyXenophileCell *xylophoneBlossomBreeze = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([JourneyXenophileCell class])];
    if (xylophoneBlossomBreeze == nil) {
        xylophoneBlossomBreeze = [[JourneyXenophileCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:NSStringFromClass([JourneyXenophileCell class])];
    }
    xylophoneBlossomBreeze.selectionStyle = UITableViewCellSelectionStyleNone;
    
    return xylophoneBlossomBreeze;
}


#pragma mark - UITableView Delegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    // cell tap action
}


@end
